package idea.innovacion.service;

import java.sql.SQLException;
import java.util.ArrayList;

import idea.innovacion.bean.RolDTO;
import idea.innovacion.factory.DAOFactory;
import idea.innovacion.interfaces.IRolDAO;

public class RolService {

	DAOFactory objDAOFactory = DAOFactory.getDAOFactory(DAOFactory.MySql);
	IRolDAO irol = objDAOFactory.getRolDAO();
	
    public boolean insertIRol(RolDTO dto) throws SQLException{
    	
    	return  irol.insertIRol(dto);
    	
    }
	
	public void deleteIRol(RolDTO dto) throws SQLException{
		
		irol.deleteIRol(dto);
	}

	public ArrayList<RolDTO> listIRol() throws SQLException{
		
		 return irol.listRol();
		 
		 
	}
	
}
